package is.BlackWhiteSquares;

import is.BlackWhiteSquares.formulas.BlWhSquaresProblem;
import is.BlackWhiteSquares.formulas.HillClimbing;
import is.BlackWhiteSquares.heuristic.BlWhEvaluationFunction;
import is.BlackWhiteSquares.heuristic.BlWhHeuristicSearchMethod;
import es.deusto.ingenieria.is.search.algorithms.blind.BreadthFSwithLog;
import es.deusto.ingenieria.is.search.algorithms.blind.DepthFSwithLog;
import es.deusto.ingenieria.is.search.algorithms.heuristic.BestFSwithLog;

public class MainProgram {

	public static void main(String[] args) {
		try {

			
			BlWhSquaresProblem problem = new BlWhSquaresProblem();	
			problem.addInitialState(problem.gatherInitialPercepts());
			/*
			problem.solve(new BestFSwithLog(new BlWhEvaluationFunction()));
			System.out.println("");
	
			BlWhHeuristicSearchMethod e = new BlWhHeuristicSearchMethod(new BlWhEvaluationFunction());
			e.search(problem, problem.gatherInitialPercepts());
			problem.solve(e);
			System.out.println("");
			*/
			HillClimbing h = new HillClimbing(new BlWhEvaluationFunction());
			problem.solve(h);
			System.out.println("");
			/*
			problem.solve(BreadthFSwithLog.getInstance());
			System.out.println("");
			problem.solve(DepthFSwithLog.getInstance());
			 */
		  } catch (Exception ex) {
			System.err.println("% [MainProgram] Error:" + ex.getMessage());
			ex.printStackTrace();
		}
	}
}
